/*
 * this class is the object version of the table Restaurant.
 */

package webapp.model;

import java.text.SimpleDateFormat;
import java.sql.*;

/**
 *
 * @author Nina
 */
public class Restaurant
{
//........................ D A T A   F I E L D S ............................//
    private int       id;
    private String    name;
    private String    barCode;
    private String    openHours;
    private String    priceRange;
    private String    phone;
    private String    website;
    private String    address;
    private String	  majorIntersection;
    private int       typeID;
    private String    rating;
    private String    image_url;

    private static final int NO_ID = -1;

//........................ C O N S T R U C T O R S ..........................//

    public Restaurant()
    {
        id = NO_ID;
        name = "";
        barCode = "";
        openHours = "";
        priceRange = "";
        phone = "";
        website = "";
        address = "";
        typeID = NO_ID;
        rating = "";
        image_url = null;
    }  // end of the constructor


    public Restaurant(int id, String _name, String _barCode,
            String _openHours, String _priceRange, String _phone, String _website, String _address,
            int typeID, String _rating, String image)
    {
        this.id          = id;
        this.name        = _name;
        this.barCode     = _barCode;
        this.openHours   = _openHours;
        //java.util.Date timenow = new java.util.Date();
        //this.postedDate  = new java.sql.Timestamp(timenow.getTime());
        this.priceRange     = _priceRange;
        this.phone       = _phone;
        this.website     = _website;
        this.address     = _address;
        this.typeID      = typeID;
        this.rating      = _rating;
        this.image_url   = image;
    } // end of the constructor




//...................... P U B L I C   M E T H O D S ........................//
//    @Override
//    public String toString()
//    {
//        return                       "\n\n[" +
//                this.id          + "]\n[" +
//                this.name        + "]\n[" +
//                this.recipe      + "]\n[" +
//                this.ingredients + "]\n[" +
//                this.noOfVotes   + "]\n[" +
//                this.rateSum     + "]\n[" +
//                this.postedDate  + "]\n[" +
//                this.user_id     + "]\n[" +
//                this.image_url   + "]\n";
//    } // end of the method

@Override
    public String toString()
    {
        return               "[" +
                this.id     + "] [" +
                this.name   + "]";
    } // end of the method



/**
* @return the id
*/
public int getId() {
return id;
}


/**
* @param id to set
*/
public void setID(int id) {
this.id = id;
}


/**
* @return the name
*/
public String getName() {
return name;
}


/**
* @param name
*/
public void setName(String name) {
this.name = name;
}

    /**
 * @return the barCode
 */
public String getBarCode() {
	return barCode;
}


/**
 * @param barCode the barCode to set
 */
public void setBarCode(String barCode) {
	this.barCode = barCode;
}


/**
 * @return the openHours
 */
public String getOpenHours() {
	return openHours;
}


/**
 * @param openHours the openHours to set
 */
public void setOpenHours(String openHours) {
	this.openHours = openHours;
}


/**
 * @return the priceRange
 */
public String getPriceRange() {
	return priceRange;
}


/**
 * @param priceRange the priceRange to set
 */
public void setPriceRange(String priceRange) {
	this.priceRange = priceRange;
}


/**
 * @return the phone
 */
public String getPhone() {
	return phone;
}


/**
 * @param phone the phone to set
 */
public void setPhone(String phone) {
	this.phone = phone;
}


/**
 * @return the website
 */
public String getWebsite() {
	return website;
}


/**
 * @param website the website to set
 */
public void setWebsite(String website) {
	this.website = website;
}


/**
 * @return the address
 */
public String getAddress() {
	return address;
}


/**
 * @param address the address to set
 */
public void setAddress(String address) {
	this.address = address;
}


/**
 * @return the typeID
 */
public int getTypeID() {
	return typeID;
}


/**
 * @param typeID the typeID to set
 */
public void setTypeID(int typeID) {
	this.typeID = typeID;
}


/**
 * @return the rating
 */
public String getRating() {
	return rating;
}


/**
 * @param rating the rating to set
 */
public void setRating(String rating) {
	this.rating = rating;
}


/**
 * @return the image_url
 */
public String getImage_url() {
	return image_url;
}


/**
 * @param image_url the image_url to set
 */
public void setImage_url(String image_url) {
	this.image_url = image_url;
}


} // end of the class
